package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.CheckGroup;
import com.itheima.vo.CheckGroupVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CheckGroupMapper extends BaseMapper<CheckGroup> {

    @Select("select g.* from t_setmeal_group t\n" +
            "left join t_check_group g on g.id = t.group_id\n" +
            "where setmeal_id = #{setmealId}")
    List<CheckGroupVO> findBySetmealId(@Param("setmealId") Long setmealId);

}
